<template>
  <div ref="editorRef" style="width: 800px; height: 500px;"></div>
</template>

<script setup>
import { onMounted, ref } from 'vue';
import * as monaco from 'monaco-editor';

const editorRef = ref(null);

onMounted(() => {
  const editor = monaco.editor.create(editorRef.value, {
    value: 'function hello() {\n  return "Hello, World!";\n}',
    language: 'python',
    theme: 'vs-dark'
  });
});
</script>

<style scoped>
/* 可以在这里添加自定义样式 */
</style>